#!/bin/bash
# shellcheck source=meta-google/recipes-google/networking/gbmc-net-common/gbmc-net-lib.sh
source /usr/share/gbmc-net-lib.sh || exit

# shellcheck disable=SC2043
for nic in @IFS@; do
  confdir="/etc/systemd/network/-bmc-${nic}.network.d"
  mkdir -p "${confdir}"
  echo "[Network]" > "${confdir}/10-ra-config.conf"
  echo "IPv6AcceptRA=true" >> "${confdir}/10-ra-config.conf"
  gbmc_net_networkd_reload "${nic}"
done

